import java.io.IOException;
import java.util.HashMap;
import java.util.List;

import org.apache.http.client.ClientProtocolException;

import com.alibaba.fastjson.JSON;
import com.bootdo.common.utils.GetUserList;
import com.bootdo.common.utils.HttpUtil;
import com.bootdo.common.wx.WeiXinUtil;
import com.bootdo.system.domain.TbWxuser;

public class cnmsssss {
	
	public static void main(String[] args) throws ClientProtocolException, IOException {
		
		  String accessToken =WeiXinUtil.getOauth2AccessToken2("wx798d61260ba95d82", "0a4268beb90365b03a1178ace409983f");
//		  List userList = GetUserList.getUserList(accessToken);
//		  for (int i = 0; i < userList.size(); i++) {
//			  System.out.println(userList.get(i));
//		}
//		
		String aa="https://api.weixin.qq.com/cgi-bin/user/info?access_token="+accessToken+"&openid=oPGEi5Q_rH9tRaJdY-n3MDNfMkkg&lang=zh_CN";
		
		String doGet = HttpUtil.doGet(aa, null);
		System.out.println(doGet);
		TbWxuser hashMap = JSON.parseObject(doGet, TbWxuser.class);
		System.out.println(hashMap.getHeadimgurl());
		
	}

}
